package com.shengdai.urms.core.service;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.Calendar;

import com.shengdai.urms.common.helper.Pagelet;
import com.shengdai.urms.core.model.UmApptype;
import com.shengdai.urms.core.model.UmCert;
import com.shengdai.urms.core.model.UmConfig;
import com.shengdai.urms.core.model.UmCss;
import com.shengdai.urms.core.model.UmDict;
import com.shengdai.urms.core.model.UmDictitem;
import com.shengdai.urms.core.model.UmDolog;
import com.shengdai.urms.core.model.UmField;
import com.shengdai.urms.core.model.UmFormtype;
import com.shengdai.urms.core.model.UmFrameset;
import com.shengdai.urms.core.model.UmGroup;
import com.shengdai.urms.core.model.UmGroupitem;
import com.shengdai.urms.core.model.UmItemtype;
import com.shengdai.urms.core.model.UmLayout;
import com.shengdai.urms.core.model.UmLogon;
import com.shengdai.urms.core.model.UmMenu;
import com.shengdai.urms.core.model.UmMenuitem;
import com.shengdai.urms.core.model.UmMessage;
import com.shengdai.urms.core.model.UmMonitor;
import com.shengdai.urms.core.model.UmOpinion;
import com.shengdai.urms.core.model.UmOrg;
import com.shengdai.urms.core.model.UmOrgtype;
import com.shengdai.urms.core.model.UmParam;
import com.shengdai.urms.core.model.UmPatch;
import com.shengdai.urms.core.model.UmPortlet;
import com.shengdai.urms.core.model.UmRecycleBin;
import com.shengdai.urms.core.model.UmReptype;
import com.shengdai.urms.core.model.UmRole;
import com.shengdai.urms.core.model.UmRoleRight;
import com.shengdai.urms.core.model.UmShortcutmenu;
import com.shengdai.urms.core.model.UmSpuser;
import com.shengdai.urms.core.model.UmStNav;
import com.shengdai.urms.core.model.UmSuperviseCfg;
import com.shengdai.urms.core.model.UmSuperviseMsg;
import com.shengdai.urms.core.model.UmSystem;
import com.shengdai.urms.core.model.UmUser;
import com.shengdai.urms.core.model.UmUserForm;
import com.shengdai.urms.core.model.UmUserMapping;
import com.shengdai.urms.core.model.UmUserRep;
import com.shengdai.urms.core.model.UmUserRight;
import com.shengdai.urms.core.model.UmUserRole;
import com.shengdai.urms.core.model.UmVersion;
import com.shengdai.urms.core.model.UmWebformSearch;
import com.shengdai.urms.core.model.UmWebformSearchitem;
import com.shengdai.urms.core.model.UmWorkItemCfg;

/**
 * 统一资源平台服务接口
 *
 * @author zhangxz 2007-10-10
 */
public interface UrmsService extends Remote {

	/**
	 * 检查服务是否可用
	 * @return
	 * @throws UrmsException
	 * @throws RemoteException
	 */
	boolean checkService()throws UrmsException, RemoteException;


	// TODO #################### 组织架构管理 #####################

	/**
	 * 创建用户
	 *
	 * @param user
	 *            用户对象
	 * @throws UrmsException,RemoteException
	 */
	void createUser(UmUser user) throws UrmsException, RemoteException;

	/**
	 * 修改用户
	 *
	 * @param user
	 * @throws UrmsException,RemoteException
	 */
	void updateUser(UmUser user) throws UrmsException, RemoteException;

	/**
	 * 根据用户Id查询用户对象
	 *
	 * @param userId
	 * @throws UrmsException,RemoteException
	 */
	UmUser findUserById(String userId) throws UrmsException, RemoteException;

	/**
	 * 根据过滤表达式过滤相关操作人
	 * @param participants 被过滤组织 id#orgtype[]
	 * @param filterExp 过滤条件
	 * @param level  过滤层级
	 * @return UmUser[]
	 * @throws UrmsException
	 */
  Object[] filterBelongGroup(Object[] participants,String executorid, String filterExp, int level) throws UrmsException, RemoteException;

	/**
	 * 根据全名来查找用户
	 *
	 * @param fullName
	 *            全名
	 * @return UmUser对象
	 * @throws UrmsException,RemoteException
	 */
	UmUser findUserByFullName(String fullName) throws UrmsException, RemoteException;

	/**
	 * 根据登录帐号获得用户信息
	 *
	 * @param logonid
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	public UmUser findUserByLogonid(String logonid) throws UrmsException, RemoteException;

	/**
	 * 批量增加字段信息
	 *
	 * @param apptype
	 *            业务类型
	 * @param fields
	 *            字段数组
	 * @throws UrmsException,RemoteException
	 */
	void createFields(String apptype, UmField[] fields) throws UrmsException, RemoteException;

	/**
	 * 根据sapid查找用户
	 *
	 * @param sapid
	 *            sapid
	 * @return UmUser对象
	 * @throws UrmsException,RemoteException
	 */
	UmUser findUserBySapid(String sapid) throws UrmsException, RemoteException;

	/**
	 * 查询所有的组织
	 *
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet listAllOrgs() throws UrmsException, RemoteException;

	/**
	 * 根据组织类型查询组织
	 *
	 * @param orgtype
	 *            组织类型
	 * @return Object[] UmOrg 列表
	 * @throws UrmsException,RemoteException
	 */
	Object[] queryOrg(String orgtype) throws UrmsException, RemoteException;

	/**
	 * 根据组织名称和组织类型查询组织
	 *
	 * @param orgname
	 *            组织名称
	 * @param orgtype
	 *            组织类型
	 * @return Object[] UmOrg 列表
	 * @throws UrmsException,RemoteException
	 */
	Object[] queryOrg(String orgname, String orgtype) throws UrmsException, RemoteException;

	/**
	 * 根据组织属性查询组织
	 *
	 * @param attribute
	 *            组织属性
	 * @return Object[] UmOrg 列表
	 * @throws UrmsException,RemoteException
	 */
	Object[] queryOrgByAttribute(String attribute) throws UrmsException, RemoteException;

	/**
	 * 根据用户Id删除对象
	 *
	 * @param userId
	 * @throws UrmsException,RemoteException
	 */
	void deleteUserById(String userId) throws UrmsException, RemoteException;

	/**
	 * 查询当前组织的直接下属用户
	 *
	 * @param orgId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryOrgUsers(String orgId) throws UrmsException, RemoteException;

	/**
	 * 分页查询当前组织的直接下属用户
	 *
	 * @param orgid
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	Pagelet queryOrgUsers(String orgid, int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * add by ccz on 2009-3-26 查询当前组织下的所有用户,包括子下属用户
	 *
	 * @param orgid
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryOrgAllUsers(String orgid, int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 *
	 * 查询当前组织下的所有用户,包括子下属用户
	 *
	 * @param orgid
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryOrgAllUsers(String orgid) throws UrmsException, RemoteException;

	/**
	 * 根据用户Id数组查询用户对象
	 *
	 * @param userids
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryUsers(String userids) throws UrmsException, RemoteException;

	/**
	 * 根据角色编码和组织id查询用户,即查既是此角色下的用户是此组织下的用户,不包括继承角色下的用户
	 *
	 * @param roleCode
	 * @param orgId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Object[] queryUsers(String roleCode, String orgId) throws UrmsException, RemoteException;

	/**
	 * 分页查询用户Id的所有对象
	 *
	 * @param userIds用逗号，分割的多个id
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	public Pagelet queryUsers(String userIds, int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 根据指定的组织ID和用户ID，判断此组织下是否存在此用户。非直属用户也在判断之列。
	 *
	 * @param orgId
	 *            组织ID
	 * @param userId
	 *            用户ID
	 * @return boolean true-是，false-否。
	 * @throws UrmsException,RemoteException
	 */
	boolean isExistUser(String orgId, String userId) throws UrmsException, RemoteException;

	/**
	 * 根据指定的父组织ID和子组织ID，判断此父组织下是否存在此子组织。非直属子组织也在判断之列。
	 *
	 * @param parentId
	 *            父组织ID
	 * @param childId
	 *            子组织ID
	 * @return boolean true-是，false-否。
	 * @throws UrmsException,RemoteException
	 */
	boolean isExistOrg(String parentId, String childId) throws UrmsException, RemoteException;

	/**
	 * 根据指定的角色编码和用户ID，判断此角色下是否存在此用户，不包括继承
	 *
	 * @param roleCode
	 *            角色编码
	 * @param userId
	 *            用户ID
	 * @return boolean true-是，false-否。
	 * @throws UrmsException,RemoteException
	 */
	boolean isExistUserRole(String roleCode, String userId) throws UrmsException, RemoteException;

	/**
	 * 根据指定的角色编码和用户ID，判断此用户是否拥有此角色的权限(注意：此用户不一定在此角色下，有可能是继承来的)
	 *
	 * @param roleCode
	 *            角色编码
	 * @param userId
	 *            用户ID
	 * @return boolean true-是，false-否。
	 * @throws UrmsException,RemoteException
	 */
	boolean isExistUserRight(String roleCode, String userId) throws UrmsException, RemoteException;

	/**
	 * 查询当前组织Id下的所有用户
	 *
	 * @param orgId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryAllUsers(String orgId) throws UrmsException, RemoteException;

	/**
	 * 创建组织
	 *
	 * @param umorg
	 *            组织对象
	 * @throws UrmsException,RemoteException
	 */
	void createOrg(UmOrg umorg) throws UrmsException, RemoteException;

	/**
	 * 修改组织对象
	 *
	 * @param umorg
	 *            组织对象
	 * @throws UrmsException,RemoteException
	 */
	void updateOrg(UmOrg umorg) throws UrmsException, RemoteException;

	/**
	 * 更新组织表相关的冗余数据：parentids,parentnames,parenttypes，注意，此接口会异步执行
	 *
	 * @param orgid
	 *            组织id，为null或""时表示根组织
	 */
	public void updateOrgRefData(String orgid) throws UrmsException, RemoteException;

	/**
	 * 更新组织表相关的冗余数据：parentids,parentnames,parenttypes
	 *
	 * @param orgid
	 *            组织id，为null或""时表示根组织
	 * @param sync
	 *            是否同步
	 */
	public void updateOrgRefData(String orgid, boolean sync) throws UrmsException, RemoteException;

	/**
	 * 更新全部下属全部父ID和全部父名称
	 *
	 * @param oldparentids
	 * @param newparentids
	 * @param oldparentnames
	 * @param newparentnames
	 * @throws UrmsException,RemoteException
	 */
	public void updateOrgChildrens(String oldparentids, String newparentids, String oldparentnames, String newparentnames, String oldparenttypes, String newparenttypes) throws UrmsException, RemoteException;

	/**
	 * 更新当前组织下的所有用户的所有父ID和所有父名称
	 *
	 * @param oldparentids
	 * @param newparentids
	 * @param oldparentnames
	 * @param newparentnames
	 */
	public void updateOrgChildrensUser(String oldparentids, String newparentids, String oldparentnames, String newparentnames, String oldparenttypes, String newparenttypes) throws UrmsException, RemoteException;

	/**
	 * 根据组织Id查询组织
	 *
	 * @param orgId
	 * @throws UrmsException,RemoteException
	 */
	
	UmOrg findOrgById(String orgId) throws UrmsException, RemoteException;

	/**
	 * 根据组织Id删除组织
	 *
	 * @param orgId
	 * @throws UrmsException,RemoteException
	 */
	void deleteOrgById(String orgId) throws UrmsException, RemoteException;

	/**
	 * 查询组织根
	 *
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet getOrgRoot() throws UrmsException, RemoteException;

	/**
	 * 获取本组织，包括本公司、本部门、本班组等
	 *
	 * @param userId
	 *            用户Id
	 * @param cfgcode
	 *            系统对（本公司、本部门、本班组）相应的配置编码
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmOrg getSelfOrg(String userId, String cfgcode) throws UrmsException, RemoteException;

	/**
	 * 获取指定层级的父组织
	 *
	 * @param userId
	 *            用户ID
	 * @param lev
	 *            层级，可以是正负，如： +1，-1，+2，-2没有0
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmOrg getSelfOrg(String userId, int lev) throws UrmsException, RemoteException;

	/**
	 * 获取指定层级的指定父组织类型的父组织
	 *
	 * @param userId
	 *            用户ID
	 * @param lev
	 *            层级，可以是正负，如： +1，-1，+2，-2没有0
	 * @param orgtype
	 *            父组织类型
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmOrg getSelfOrg(String userId, int lev, String orgtype) throws UrmsException, RemoteException;

	/**
	 * 读取所有的框架定义
	 *
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet getFlamexml() throws UrmsException, RemoteException;

	/**
	 * 查询用户管理的组织架构根组织
	 *
	 * @param userId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet getOrgRoot(String userId) throws UrmsException, RemoteException;

	/**
	 * 查询当前组织的直接下属
	 *
	 * @param orgId
	 * @return 当前组织的直接下属组织
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryOrgChildrens(String orgId) throws UrmsException, RemoteException;

	/**
	 * 查询当前组织下属的所有组织树，不包括用户
	 *
	 * @param orgId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryOrgTree(String orgId) throws UrmsException, RemoteException;

	/**
	 * 根据组织编码查找组织
	 *
	 * @param orgCode
	 * @return
	 */
	UmOrg findOrgByCode(String orgCode) throws UrmsException, RemoteException;

	/**
	 * 根据sapid查找组织
	 *
	 * @param sapid
	 * @return
	 */
	UmOrg findOrgBySapid(String sapid) throws UrmsException, RemoteException;

	/*******************************************************************************************************************************************************************************
	 * 初始化员工的密码为password,
	 *
	 * @param orgid
	 *            这个为组织id ，当orgid为null的时候，对整个组织进行初始化
	 * @param password
	 *            Md5加密后的参数
	 * @return
	 */
	boolean initUmUserPassword(String orgid, String password) throws UrmsException, RemoteException;

	// TODO ################## 系统配置管理 #######################

	/**
	 * 新增系统配置信息
	 *
	 * @param System
	 * @throws UrmsException,RemoteException
	 */
	void createSystem(UmSystem system) throws UrmsException, RemoteException;

	/**
	 * 修改系统配置信息
	 *
	 * @param System
	 * @throws UrmsException,RemoteException
	 */
	void updateSystem(UmSystem system) throws UrmsException, RemoteException;

	/**
	 * 根据系统Id删除系统
	 *
	 * @param systemId
	 * @throws UrmsException,RemoteException
	 */
	void deleteSystemById(String systemId) throws UrmsException, RemoteException;

	/**
	 * 根据系统Id查询系统配置
	 *
	 * @param systemId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmSystem findSystemById(String systemId) throws UrmsException, RemoteException;

	/**
	 * 判断系统代码是否存在
	 *
	 * @param syscode
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmSystem findSystemsBySyscode(String syscode) throws UrmsException, RemoteException;

	/**
	 * 分页查询系统信息
	 *
	 * @param pageIndex
	 *            当前页面
	 * @param pageSize
	 *            页记录大小
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet querySystems(int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 根据系统代码查询系统列表
	 *
	 * @param syscodes
	 * @return
	 */
	Pagelet querySystems(String syscodes) throws UrmsException, RemoteException;

	/**
	 * 根据虚拟系统标志查询系统
	 *
	 * @param cosys
	 *            0-否，1-是
	 * @return
	 */
	Pagelet querySystems(int cosys) throws UrmsException, RemoteException;

	/**
	 * 查询所有的系统列表
	 *
	 * @param syscodes
	 * @return
	 */
	Pagelet queryAllSystems() throws UrmsException, RemoteException;

	/**
	 * 根据系统代码和系统名称模糊分页查询系统
	 *
	 * @param syscode
	 * @param sysname
	 * @param adminsys
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	Pagelet querySystems(String syscode, String sysname,String adminsys, int pageIndex, int pageSize) throws UrmsException, RemoteException;

	// TODO ################ 业务代码管理 ###########################

	/**
	 * 新增业务类型
	 *
	 * @param Apptype
	 * @throws UrmsException,RemoteException
	 */
	void createApptype(UmApptype apptype) throws UrmsException, RemoteException;

	/**
	 * 修改业务类型
	 *
	 * @param Apptype
	 * @throws UrmsException,RemoteException
	 */
	void updateApptype(UmApptype apptype) throws UrmsException, RemoteException;

	/**
	 * 根据业务类型Id删除业务类型数据
	 *
	 * @param apptypeId
	 * @throws UrmsException,RemoteException
	 */
	void deleteApptypeById(String apptypeId) throws UrmsException, RemoteException;

	/**
	 * 根据业务类型Id查询业务类型数据
	 *
	 * @param apptypeId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmApptype findApptypeById(String apptypeId) throws UrmsException, RemoteException;

	/**
	 * 分页查询业务类型
	 *
	 * @param pageIndex
	 *            当前页码
	 * @param pageSize
	 *            页记录数
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryApptypes(int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 根据系统代码Syscode分页查询业务类型
	 *
	 * @param pageIndex
	 *            当前页码
	 * @param pageSize
	 *            页记录数
	 * @param syscode
	 *            系统编号
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryApptypes(int pageIndex, int pageSize, String syscode) throws UrmsException, RemoteException;

	/**
	 * 根据业务类型编码,业务类型名称,系统编号Syscode分页查询
	 *
	 * @param pageIndex
	 * @param pageSize
	 * @param syscode
	 * @param userId
	 *            用户ID
	 * @return
	 */
	public Pagelet queryApptypes(String apptype, String apptypename, int pageIndex, int pageSize, String syscode, String userId) throws UrmsException, RemoteException;

	/**
	 * 查询所有业务类型
	 *
	 * @return Pagelet
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryAllApptypes() throws UrmsException, RemoteException;

	/**
	 * 根据系统代码Syscode查询业务类型
	 *
	 * @param syscode
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryApptypes(String syscode) throws UrmsException, RemoteException;

	// TODO #################### 角色管理 ##############################

	/**
	 * 新建角色
	 *
	 * @param Role
	 * @throws UrmsException,RemoteException
	 */
	void createRole(UmRole role) throws UrmsException, RemoteException;

	/**
	 * 创建监控对象
	 *
	 * @param monitor
	 *            监控对象
	 * @throws UrmsException,RemoteException
	 */
	void createMonitor(UmMonitor monitor) throws UrmsException, RemoteException;

	/**
	 * 批量创建监控对象
	 *
	 * @param monitors
	 *            监控对象数组
	 * @throws UrmsException,RemoteException
	 */
	void createMonitors(Object[] monitors) throws UrmsException, RemoteException;

	/**
	 * 根据查询条件查询监控对象
	 * @param querydatas
	 * @param pageIndex
	 * @param pageSize
	 * @throws UrmsException
	 * @throws RemoteException
	 */
	Pagelet queryMonitors(Object[] querydatas,int pageIndex,int pageSize) throws UrmsException, RemoteException;

	/**
	 * 创建操作日志
	 *
	 * @param logoperate
	 *            操作日志对象
	 * @throws UrmsException,RemoteException
	 */
	void createDolog(UmDolog dolog) throws UrmsException, RemoteException;

	/**
	 * 批量创建操作日志
	 *
	 * @param dologs
	 *            操作日志对象数组
	 * @throws UrmsException,RemoteException
	 */
	void createDologs(Object[] dologs) throws UrmsException, RemoteException;

	/**
	 * 创建操作日志
	 *
	 * @param logoperate
	 *            操作日志对象
	 * @throws UrmsException,RemoteException
	 */
	void createDolog(int loglevel, UmDolog dolog) throws UrmsException, RemoteException;

	/**
	 * 修改角色
	 *
	 * @param Role
	 * @throws UrmsException,RemoteException
	 */
	void updateRole(UmRole role) throws UrmsException, RemoteException;

	/**
	 * 根据角色Id删除角色信息
	 *
	 * @param roleId
	 * @throws UrmsException,RemoteException
	 */
	void deleteRoleById(String roleId) throws UrmsException, RemoteException;

	/**
	 * 删除一组角色
	 *
	 * @param roleIds
	 * @throws UrmsException,RemoteException
	 */
	void deleteRoles(String[] roleIds) throws UrmsException, RemoteException;

	/**
	 * 根据角色Id查询角色信息
	 *
	 * @param roleId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmRole findRoleById(String roleId) throws UrmsException, RemoteException;

	/**
	 * 根据角色编码查询角色信息
	 *
	 * @param rolecode
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmRole findRoleByRolecode(String rolecode) throws UrmsException, RemoteException;

	/**
	 * 分页查询角色信息
	 *
	 * @param pageIndex
	 *            当前页码
	 * @param pageSize
	 *            页记录数
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryRoles(String syscode, String rolename, int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 根据系统代码查询全部角色信息
	 *
	 * @param syscode
	 *            系统代码
	 * @return
	 * @throws UrmsException,RemoteException
	 */

	Pagelet queryRolesBySyscode(String syscode) throws UrmsException, RemoteException;

	/**
	 * 查询角色id的对象列表
	 *
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryRoles(String roleids) throws UrmsException, RemoteException;

	/**
	 * 查询全部的角色
	 *
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet listAllRoles() throws UrmsException, RemoteException;

	/**
	 * 新增字典
	 *
	 * @param Dict
	 * @throws UrmsException,RemoteException
	 */
	void createDict(UmDict dict) throws UrmsException, RemoteException;

	/**
	 * 保存菜单参数
	 *
	 * @param param
	 * @throws UrmsException,RemoteException
	 */
	void createParam(UmParam param) throws UrmsException, RemoteException;

	/**
	 * 修改字典
	 *
	 * @param Dict
	 * @throws UrmsException,RemoteException
	 */
	void updateDict(UmDict dict) throws UrmsException, RemoteException;

	/**
	 * 根据字典Id删除字典资料
	 *
	 * @param dictId
	 * @throws UrmsException,RemoteException
	 */
	void deleteDictById(String dictId) throws UrmsException, RemoteException;

	/**
	 * 根据字典Id查询字典记录
	 *
	 * @param dictId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmDict findDictById(String dictId) throws UrmsException, RemoteException;

	/**
	 * 分页查询字典信息
	 *
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryDicts(int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 列出所有的字典以及字典项对象
	 *
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Object[] listAllDictsWithItems() throws UrmsException, RemoteException;

	/**
	 * 根据字典编码查询字典信息
	 *
	 * @param dictcode
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmDict findDictsByDictcode(String dictcode) throws UrmsException, RemoteException;

	/**
	 * 新增字典项
	 *
	 * @param dictitem
	 * @throws UrmsException,RemoteException
	 */
	void createDictitem(UmDictitem dictitem) throws UrmsException, RemoteException;

	/**
	 * 修改字典项
	 *
	 * @param dictitem
	 * @throws UrmsException,RemoteException
	 */
	void updateDictitem(UmDictitem dictitem) throws UrmsException, RemoteException;

	/**
	 * 根据字典项Id删除字典项
	 *
	 * @param dictitemId
	 * @throws UrmsException,RemoteException
	 */
	void deleteDictitemById(String dictitemId) throws UrmsException, RemoteException;

	/**
	 * 删除字典项对象
	 *
	 * @param dictitem
	 * @throws UrmsException,RemoteException
	 */
	void deleteDictitem(UmDictitem dictitem) throws UrmsException, RemoteException;

	/**
	 * 根据字典项Id查询字典项目
	 *
	 * @param dictitemId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmDictitem findDictitemById(String dictitemId) throws UrmsException, RemoteException;

	/**
	 * 根据字典Id查询字典项目
	 *
	 * @param dictId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet findDictitemByDictId(String dictId) throws UrmsException, RemoteException;

	/**
	 *
	 * @param pageIndex
	 *            当前页码
	 * @param pageSize
	 *            页记录数
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryDictitems(int pageIndex, int pageSize) throws UrmsException, RemoteException;

	// TODO ########## 功能菜单管理 ###############

	/**
	 * 新增功能菜单
	 *
	 * @param menu
	 * @throws UrmsException,RemoteException
	 */
	void createMenu(UmMenu menu) throws UrmsException, RemoteException;

	/**
	 * 修改功能菜单
	 *
	 * @param menu
	 * @throws UrmsException,RemoteException
	 */
	void updateMenu(UmMenu menu) throws UrmsException, RemoteException;

	/**
	 * 更新参数
	 *
	 * @param param
	 * @throws UrmsException,RemoteException
	 */
	void updateParam(UmParam param) throws UrmsException, RemoteException;

	/**
	 * 根据功能菜单Id删除菜单
	 *
	 * @param menuId
	 * @throws UrmsException,RemoteException
	 */
	void deleteMenu(String menuid) throws UrmsException, RemoteException;

	/**
	 * 查询所有的菜单
	 *
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet listAllMenus() throws UrmsException, RemoteException;

	/**
	 * 通过Id查询功能菜单
	 *
	 * @param menuId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmMenu findMenuById(String menuId) throws UrmsException, RemoteException;

	/**
	 * 根据菜单Id查询相关参数定义
	 *
	 * @param menuId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmParam findParamById(String menuId) throws UrmsException, RemoteException;

	/**
	 * 根据菜单编码查询菜单
	 *
	 * @param menucode
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmMenu findMenusByMenucode(String menucode) throws UrmsException, RemoteException;

	/**
	 * 分页查询功能菜单
	 *
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryMenus(int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 查询用户能查看本系统的所有菜单
	 *
	 * @param sysCode
	 *            系统代码
	 * @param userId
	 *            用户id
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet querySystemMenus(String sysCode, String userId) throws UrmsException, RemoteException;

	/**
	 * 根据menuid查询用户能查看的菜单
	 *
	 * @param menuid
	 * @param userId
	 * @param falg(Y－包括子菜单，N－不包括子菜单)
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryMenus(String menuid, String userId, String falg) throws UrmsException, RemoteException;

	/**
	 * 新增功能项目
	 *
	 * @param menuitem
	 * @throws UrmsException,RemoteException
	 */
	void createMenuitem(UmMenuitem menuitem) throws UrmsException, RemoteException;

	/**
	 * 修改菜单项
	 *
	 * @param menuitem
	 * @throws UrmsException,RemoteException
	 */
	void updateMenuitem(UmMenuitem menuitem) throws UrmsException, RemoteException;

	/**
	 * 删除菜单项
	 *
	 * @param menuitemId
	 * @throws UrmsException,RemoteException
	 */
	void deleteMenuitem(UmMenuitem menuitem) throws UrmsException, RemoteException;

	/**
	 * 根据菜单项Id查询功能菜单项
	 *
	 * @param MenuitemId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmMenuitem findMenuitemById(String menuitemId) throws UrmsException, RemoteException;

	/**
	 * 分页查询菜单项
	 *
	 * @param pageIndex
	 *            当前页码
	 * @param pageSize
	 *            页记录数
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryMenuitems(int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 查询当前菜单的子菜单
	 *
	 * @param orgId
	 * @return 当前组织的直接下属组织
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryMenuChildrens(String menuid) throws UrmsException, RemoteException;

	/**
	 * 更新全部下属全部父ID
	 *
	 * @param oldparentids
	 * @param newparentids
	 * @throws UrmsException,RemoteException
	 */
	void updateMenuChildrens(String oldparentids, String newparentids, String syscode) throws UrmsException, RemoteException;

	// TODO #################### 权限管理 ###################
	/**
	 * 创建用户角色
	 */
	void createUserRole(UmUserRole userRole) throws UrmsException, RemoteException;

	/**
	 * 更新用户角色
	 *
	 * @param userRole
	 * @throws UrmsException,RemoteException
	 */
	void updateUserRole(UmUserRole userRole) throws UrmsException, RemoteException;

	/**
	 * 增加更新、增加角色roleId的用户
	 *
	 * @param roleId
	 * @param userIds
	 * @throws UrmsException,RemoteException
	 */
	void createRoleUsers(String roleId, String[] userIds) throws UrmsException, RemoteException;

	/**
	 * 覆盖更新、增加角色roleId的用户
	 *
	 * @param roleIds
	 *            角色列表，用逗号分割
	 * @param userIds
	 *            用户id数组
	 * @throws UrmsException,RemoteException
	 */
	void updateRoleUsers(String roleIds, String[] userIds) throws UrmsException, RemoteException;

	/**
	 * 删除角色roleId的用户
	 *
	 * @param roleIds
	 *            角色列表，用逗号分割
	 * @param userIds
	 *            用户id数组
	 * @throws UrmsException,RemoteException
	 */
	void deleteRoleUsers(String roleIds, String[] userIds) throws UrmsException, RemoteException;

	/**
	 * 查询用户能够登录使用的系统列表
	 *
	 * @param userId
	 *            用户Id
	 * @return 系统对象列表
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryLoginSystems(String userId) throws UrmsException, RemoteException;

	/**
	 * 查询用户能够登录使用的虚拟或非虚拟系统列表
	 *
	 * @param userId
	 *            用户Id
	 * @param cosys
	 *            虚拟系统 0-否，1-是
	 * @return 系统对象列表
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryLoginSystems(String userId, int cosys) throws UrmsException, RemoteException;

	/**
	 * 查询用户能够查看的系统列表
	 *
	 * @param userId
	 *            用户Id
	 * @return 系统对象列表
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryViewRoleSystems(String userId) throws UrmsException, RemoteException;

	/**
	 * 查询用户能够增加角色的系统
	 *
	 * @param userId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryAddRoleSystems(String userId) throws UrmsException, RemoteException;

	/**
	 * 查询用户能够增加角色的系统
	 *
	 * @param userId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryEditRoleSystems(String userId) throws UrmsException, RemoteException;

	/**
	 * 查询用户可以管理的系统
	 *
	 * @param userId
	 *            用户Id
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryAdminSystems(String userId) throws UrmsException, RemoteException;

	/**
	 * 查询用户拥有权限的菜单，包括菜单与菜单项
	 *
	 * @param sysCode
	 *            系统代码
	 * @param userId
	 *            用户Id
	 * @return 用户拥有的菜单列表
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryUserMenus(String sysCode, String userId) throws UrmsException, RemoteException;

	/**
	 * 查询用户拥有权限的指定菜单类型的菜单
	 *
	 * @param sysCode
	 *            系统代码
	 * @param userId
	 *            用户ID
	 * @param showtype
	 *            菜单类型
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryUserMenus(String sysCode, String userId, String showtype) throws UrmsException, RemoteException;

	/**
	 * 查询指定系统编码的菜单
	 *
	 * @param sysCode
	 *            系统代码
	 * @return 用户拥有的菜单列表
	 * @throws UrmsException,RemoteException
	 */
	Pagelet querySystemMenus(String sysCode) throws UrmsException, RemoteException;

	/**
	 * 查询用户拥有管理权限的菜单，包括菜单与菜单项
	 *
	 * @param sysCode
	 *            系统代码
	 * @param userId
	 *            用户Id
	 * @return 用户拥有的菜单列表
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryAdminMenus(String sysCode, String userId) throws UrmsException, RemoteException;

	/*
	 * 查询用户拥有管理权限的菜单，包括菜单与菜单项
	 *
	 * @param sysCode 系统代码 @param userId 用户Id @param showtype 菜单类型 @return 用户拥有的菜单列表 @throws UrmsException,RemoteException
	 */
	Pagelet queryAdminMenus(String sysCode, String userId, String showtype) throws UrmsException, RemoteException;

	/**
	 * 查询用户拥有权限的菜单，（不包括menuid及其下属的菜单）适合弹出选择父菜单树
	 *
	 * @param syscode
	 * @param userid
	 * @param menuid
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryOthersMenus(String syscode, String userid, String menuid) throws UrmsException, RemoteException;

	/**
	 * 查询用户所能查看的角色
	 *
	 * @param userId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryAdminRoles(String userId) throws UrmsException, RemoteException;

	/**
	 * 查询用户能够查看的角色列表
	 *
	 * @param userId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryViewRoles(String userId) throws UrmsException, RemoteException;

	/**
	 * 分页查询用户能够查看的角色列表
	 *
	 * @param userId
	 *            用户ID
	 * @param syscode
	 *            系统编码 ，为空查询所有全部有权查看的系统
	 * @param rolename
	 *            角色名称，为空查询全部角色
	 * @param pageIndex
	 *            当前页码，从1开始
	 * @param pageSize
	 *            页面大小
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryViewRoles(String userId, String syscode, String rolename, int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 查询用户能够修改的角色列表
	 *
	 * @param userId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryEditRoles(String userId) throws UrmsException, RemoteException;

	/**
	 * 根据角色Id查询角色用户
	 *
	 * @param roleId
	 *            角色Id
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryRoleUsers(String roleId) throws UrmsException, RemoteException;

	/**
	 * 根据角色Id查询角色用户
	 *
	 * @param roleId
	 *            角色Id
	 * @param roleId
	 *            角色Id
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryRoleUsers(String roleId, String userId) throws UrmsException, RemoteException;

	/**
	 * 根据用户Id查询用户的所有角色，包括组合角色与继承角色
	 *
	 * @param userId
	 *            用户ID
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryUserAllRoles(String userId) throws UrmsException, RemoteException;

	/**
	 * 查询用户基本信息，是否超级用户，是否过期
	 *
	 * @param loginId
	 *            登陆帐号
	 * @param password
	 *            未加密的密码
	 * @return
	 */
	UmLogon getLogonInfo(String loginId, String password) throws UrmsException, RemoteException;

	/**
	 * 查询用户基本信息，是否超级用户，是否过期
	 *
	 * @param loginId
	 *            用户ID
	 * @param isSpuser
	 *            是否超级用户
	 * @return
	 */
	UmLogon getLogonInfo(String userId, boolean isSpuser) throws UrmsException, RemoteException;

	/**
	 * 通过用户ID查找用户角色权限
	 *
	 * @param id
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmUserRole findUserRoleById(String id) throws UrmsException, RemoteException;

	/**
	 * 分页查询角色拥有的用户对象
	 *
	 * @param roleId
	 *            角色Id
	 * @param pageIndex
	 *            当前页码
	 * @param pageSize
	 *            页记录数
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryRoleUsers(String roleId, int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 根据菜单Id查询菜单项
	 *
	 * @param menuId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryMenuitems(String menuId) throws UrmsException, RemoteException;

	/**
	 * 根据菜单编码查询菜单项
	 *
	 * @param menuCode
	 * @param pageType
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryMenuitems(String menuCode, String pageType) throws UrmsException, RemoteException;

	/**
	 * 根据用户Id查询功能
	 *
	 * @param userId
	 *            用户Id
	 * @param menuCode
	 *            菜单代码
	 * @param pageType
	 *            页面类型
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryMenuitems(String userId, String menuCode, String pageType) throws UrmsException, RemoteException;

	// TODO ################## 超级用户管理 #######################

	/**
	 * 新增超级用户信息
	 *
	 * @param spuser
	 * @throws UrmsException,RemoteException
	 */
	void createSpuser(UmSpuser spuser) throws UrmsException, RemoteException;

	/**
	 * 修改超级用户信息
	 *
	 * @param spuser
	 * @throws UrmsException,RemoteException
	 */
	void updateSpuser(UmSpuser spuser) throws UrmsException, RemoteException;

	/**
	 * 根据超级用户Id删除超级用户
	 *
	 * @param spuserId
	 * @throws UrmsException,RemoteException
	 */
	void deleteSpuserById(String spuserId) throws UrmsException, RemoteException;

	/**
	 * 根据超级用户Id查询超级用户
	 *
	 * @param spuserId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmSpuser findSpuserById(String spuserId) throws UrmsException, RemoteException;

	/**
	 * 根据登录帐号查询超级用户
	 *
	 * @param syscode
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmSpuser findSpusersByLoginid(String logonid) throws UrmsException, RemoteException;

	/**
	 * 分页查询超级用户信息
	 *
	 * @param pageIndex
	 *            当前页面
	 * @param pageSize
	 *            页记录大小
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet querySpusers(int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 根据登录帐号查询超级用户列表
	 *
	 * @param syscodes
	 * @return
	 */
	Pagelet querySpusers(String logonid) throws UrmsException, RemoteException;

	/**
	 * 根据默认框架查询超级用户列表
	 *
	 * @param framesetid
	 * @return
	 */
	Pagelet querySpusersByFramesetid(String framesetid) throws UrmsException, RemoteException;

	// TODO ################## 配置管理 #######################

	/**
	 * 新增配置信息
	 *
	 * @param config
	 * @throws UrmsException,RemoteException
	 */
	void createConfig(UmConfig config) throws UrmsException, RemoteException;

	/**
	 * 修改配置信息
	 *
	 * @param config
	 * @throws UrmsException,RemoteException
	 */
	void updateConfig(UmConfig config) throws UrmsException, RemoteException;

	/**
	 * 根据配置Id删除配置
	 *
	 * @param configId
	 * @throws UrmsException,RemoteException
	 */
	void deleteConfigById(String configId) throws UrmsException, RemoteException;

	/**
	 * 根据配置Id查询配置
	 *
	 * @param configId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmConfig findConfigById(String configId) throws UrmsException, RemoteException;

	/**
	 * 分页查询配置信息
	 *
	 * @param pageIndex
	 *            当前页面
	 * @param pageSize
	 *            页记录大小
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryConfigs(int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 根据配置代码和配置名称分页列出配置
	 *
	 * @return Pagelet
	 */
	Pagelet queryConfigs(String cfgcode, String cfgname, int pageIndex, int pageSize) throws UrmsException, RemoteException;
	
	/**
	 * 
	 * @param cfgcode		配置代码
	 * @param cfgname		配置名称
	 * @param itemtypeid	所属项目ID
	 * @param ispublic		是否公共参数
	 * @param pageIndex		当前页面
	 * @param pageSize		页面记录条数
	 * @return
	 */
	Pagelet queryCofings(String cfgcode, String cfgname, String itemtypeid, String ispublic, int pageIndex, int pageSize) throws UrmsException , RemoteException;

	/**
	 * 根据配置编码查询配置信息
	 *
	 * @param cfgcode
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmConfig findConfigsByCfgcode(String cfgcode) throws UrmsException, RemoteException;

	/**
	 * 根据用户登录帐号，密码查询
	 *
	 * @param logonid
	 * @param password
	 * @return
	 */
	UmSpuser findSpusers(String logonid, String password) throws UrmsException, RemoteException;

	/**
	 * 根据用户登录帐号，密码查询
	 *
	 * @param logonid
	 * @param password
	 * @return
	 */
	UmUser findUser(String logonid, String password) throws UrmsException, RemoteException;

	// TODO ################## 角色权限分配 #######################
	/**
	 * 新建角色权限
	 *
	 * @param roleRight
	 */
	void createRoleRight(UmRoleRight roleRight) throws UrmsException, RemoteException;

	/**
	 * 创建角色权限
	 *
	 * @param syscode
	 *            系统代码
	 * @param roleid
	 *            角色ID
	 * @param delmenuids
	 *            删除菜单ID，多个用","分割
	 * @param menuids
	 *            菜单ID，多个用","分割
	 * @param menuitemids
	 *            菜单项ID，多个用","分割
	 * @param operates
	 *            操作控制，多个用","分割
	 * @param admins
	 *            是否可管理，多个用","分割
	 */
	void createRoleRights(String syscode, String roleid, String delmenuids, String menuids, String menuitemids, String operates, String admins) throws UrmsException, RemoteException;

	/**
	 * 根据系统编号，角色ID，功能项ID 查询角色是否分配权限
	 *
	 * @param syscode
	 * @param roleid
	 * @param menuitemid
	 * @return
	 */
	UmRoleRight findRoleRight(String syscode, String roleid, String menuitemid) throws UrmsException, RemoteException;

	/**
	 * 根据ID删除角色权限
	 *
	 * @param roleRightId
	 * @throws UrmsException,RemoteException
	 */
	void deleteRoleRight(UmRoleRight roleRight) throws UrmsException, RemoteException;

	/**
	 * 删除roleId,menuId下面的所有权限
	 *
	 * @param roleId
	 * @param menuId
	 * @throws UrmsException,RemoteException
	 */
	void deleteRoleRight(String roleId, String menuId) throws UrmsException, RemoteException;

	/**
	 * 检测用户是否能够打开菜单指向的连接地址，userId是普通用户Id， 对超级管理员不能用这个方法验证（超级管理员验证应该在Action层进行控制，主要从效率考虑）。
	 *
	 * @param userId
	 *            普通用户ID
	 * @param menuId
	 *            菜单ID
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	boolean checkOpenURL(String userId, String menuId) throws UrmsException, RemoteException;

	/**
	 * 根据角色Id，菜单Id查询所有菜单项
	 *
	 * @param roleid
	 * @param menuid
	 * @return
	 */
	Pagelet queryAdminMenuItems(String userId, String roleid, String menuid) throws UrmsException, RemoteException;

	/**
	 * 根据系统代码查询能够管理的菜单项
	 *
	 * @param userId
	 *            用户ID
	 * @param roleid
	 *            角色ID
	 * @param syscode
	 *            系统代码
	 * @return
	 */
	Pagelet querySystemAdminMenuitems(String userId, String roleid, String syscode) throws UrmsException, RemoteException;

	/**
	 * 根据角色Id，菜单Id查询所有子菜单项，包括功能点 返回菜单列表，里面包括功能项
	 *
	 * @param roleid
	 * @param menuid
	 * @return
	 */
	Pagelet queryAllAdminMenuitems(String userId, String roleId, String menuid) throws UrmsException, RemoteException;

	/**
	 * 根据用户ID查询所有的功能项
	 *
	 * @param userId
	 * @param menuid
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryUserMenuitems(String userId, String menuid) throws UrmsException, RemoteException;

	// TODO ################## 组织类型管理 #######################

	/**
	 * 新增组织类型信息
	 *
	 * @param orgtype
	 * @throws UrmsException,RemoteException
	 */
	void createOrgtype(UmOrgtype orgtype) throws UrmsException, RemoteException;

	/**
	 * 修改组织类型信息
	 *
	 * @param orgtype
	 * @throws UrmsException,RemoteException
	 */
	void updateOrgtype(UmOrgtype orgtype) throws UrmsException, RemoteException;

	/**
	 * 根据组织类型Id删除组织类型
	 *
	 * @param orgtypeId
	 * @throws UrmsException,RemoteException
	 */
	void deleteOrgtypeById(String orgtypeId) throws UrmsException, RemoteException;

	/**
	 * 根据组织类型Id查询组织类型
	 *
	 * @param orgtypeId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmOrgtype findOrgtypeById(String orgtypeId) throws UrmsException, RemoteException;

	/**
	 * 分页查询组织类型信息
	 *
	 * @param pageIndex
	 *            当前页面
	 * @param pageSize
	 *            页记录大小
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryOrgtypes(int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 根据组织类型编码查询组织类型信息
	 *
	 * @param typecode
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmOrgtype findOrgtypesByTypecode(String typecode) throws UrmsException, RemoteException;

	/**
	 * 查询所有的组织类型
	 *
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryAllOrgtypes() throws UrmsException, RemoteException;

	// TODO ########## 群组管理 ###############

	/**
	 * 新增群组
	 *
	 * @param group
	 * @throws UrmsException,RemoteException
	 */
	void createGroup(UmGroup group) throws UrmsException, RemoteException;

	/**
	 * 修改群组
	 *
	 * @param group
	 * @throws UrmsException,RemoteException
	 */
	void updateGroup(UmGroup group) throws UrmsException, RemoteException;

	/**
	 * 根据群组Id删除群组
	 *
	 * @param groupId
	 * @throws UrmsException,RemoteException
	 */
	void deleteGroupById(String groupid) throws UrmsException, RemoteException;

	/**
	 * 查询所有的群组
	 *
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet listAllGroups() throws UrmsException, RemoteException;

	/**
	 * 查询关联菜单项
	 *
	 * @param refMenuid
	 *            关联菜单ID
	 * @return UmMenuitem Object[]
	 * @throws UrmsException,RemoteException
	 */
	Object[] queryRefMenuitems(String refMenuid) throws UrmsException, RemoteException;

	/**
	 * 查询所有系统配置参数
	 *
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet listAllConfigs() throws UrmsException, RemoteException;

	/**
	 * 通过Id查询群组
	 *
	 * @param groupId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmGroup findGroupById(String groupId) throws UrmsException, RemoteException;

	/**
	 * 分页查询群组
	 *
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryGroups(int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 查询用户能够查看群组
	 *
	 * @param sysCode
	 * @param userId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryViewGroups(String sysCode, String userId) throws UrmsException, RemoteException;

	/**
	 * 查询用户能够查看公共群组
	 *
	 * @param userId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryPublicGroups(String userId) throws UrmsException, RemoteException;

	/**
	 * 新增功能项目
	 *
	 * @param groupitem
	 * @throws UrmsException,RemoteException
	 */
	void createGroupitem(UmGroupitem groupitem) throws UrmsException, RemoteException;

	/**
	 * 删除群组项
	 *
	 * @param groupitemId
	 * @throws UrmsException,RemoteException
	 */
	void deleteGroupitem(UmGroupitem groupitem) throws UrmsException, RemoteException;

	/**
	 * 根据群组Id查询群组项
	 *
	 * @param GroupitemId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryGroupitems(String groupid) throws UrmsException, RemoteException;

	/**
	 * 查询当前群组的子群组
	 *
	 * @param groupId
	 * @return 当前组织的直接下属组织
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryGroupChildrens(String groupId) throws UrmsException, RemoteException;

	/**
	 * 根据用户ID查询功能权限
	 *
	 * @param userId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryUserRights(String userId) throws UrmsException, RemoteException;

	/**
	 * 根据用户ID查询所有该用户能够执行的功能权限 包括角色权限与用户权限
	 *
	 * @param userId
	 *            用户ID
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryUserAllRights(String userId) throws UrmsException, RemoteException;

	/**
	 * 根据用户ID删除功能权限
	 *
	 * @param userId
	 * @throws UrmsException,RemoteException
	 */
	void deleteUserRights(String userId) throws UrmsException, RemoteException;

	/**
	 * 新增功能权限
	 *
	 * @throws UrmsException,RemoteException
	 */
	void createUserRight(UmUserRight userRight) throws UrmsException, RemoteException;

	/**
	 * 创建用户功能权限
	 *
	 * @param userId
	 *            用户ID
	 * @param items
	 *            功能点数组，每条格式：syscode,menuid,menuitemid
	 * @param admins
	 *            管理字符串， 与功能点数组对应
	 * @param operates
	 *            操作控制，与功能点数组对应
	 * @throws UrmsException,RemoteException
	 */
	void createUserRights(String userId, String[] items, String admins, String operates) throws UrmsException, RemoteException;

	/**
	 * 检查用户userId是否有查看角色roleId的权限
	 *
	 * @param userId
	 *            用户ID
	 * @param roleId
	 *            角色ID
	 * @return true-允许，false-不允许
	 * @throws UrmsException,RemoteException
	 */
	boolean checkViewRole(String userId, String roleId) throws UrmsException, RemoteException;

	/**
	 * 检查用户userId是否有编辑角色roleId的权限
	 *
	 * @param userId
	 *            用户ID
	 * @param roleId
	 *            角色ID
	 * @return true-允许，false-不允许
	 * @throws UrmsException,RemoteException
	 */
	boolean checkEditRole(String userId, String roleId) throws UrmsException, RemoteException;

	/**
	 * 检查用户userId是否有删除角色roleId的权限
	 *
	 * @param userId
	 *            用户ID
	 * @param roleId
	 *            角色ID
	 * @return true-允许，false-不允许
	 * @throws UrmsException,RemoteException
	 */
	boolean checkDelRole(String userId, String roleId) throws UrmsException, RemoteException;

	/**
	 * 检查用户userId是否有创建角色的权限
	 *
	 * @param userId
	 *            用户ID
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	boolean checkCreateRole(String userId) throws UrmsException, RemoteException;

	/**
	 * 根据用户Id查询该用户能够管理的授权用户
	 *
	 * @param logonid
	 * @param username
	 * @param userid
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryUsers(String userId, String logonid, String username, int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 根据组织Id、登录id和用户名查询用户，如果组织id为空，则查全部组织下的用户
	 *
	 * @param orgId
	 *            组织Id
	 * @param logonId
	 *            登录id
	 * @param userName
	 *            用户名
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryUsers(String orgId, String logonId, String userName) throws UrmsException, RemoteException;

	/**
	 * 根据用户Id,部门名称查询该用户能够管理的授权用户
	 *
	 * @param logonid
	 * @param username
	 * @param userid
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 * @throws UrmsException,RemoteException
	 */

	// TODO ################## 门户框架 #######################
	/**
	 * 查询所有的框架
	 */
	Pagelet listAllFramesets() throws UrmsException, RemoteException;

	/**
	 * 新增门户框架
	 *
	 * @param Frameset
	 * @throws UrmsException,RemoteException
	 */
	void createFrameset(UmFrameset frameset) throws UrmsException, RemoteException;

	/**
	 * 修改门户框架
	 *
	 * @param Frameset
	 * @throws UrmsException,RemoteException
	 */
	void updateFrameset(UmFrameset frameset) throws UrmsException, RemoteException;

	/**
	 * 根据门户框架Id删除门户框架资料
	 *
	 * @param framesetId
	 * @throws UrmsException,RemoteException
	 */
	void deleteFramesetById(String framesetId) throws UrmsException, RemoteException;

	/**
	 * 根据门户框架Id查询门户框架记录
	 *
	 * @param framesetId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmFrameset findFramesetById(String framesetId) throws UrmsException, RemoteException;

	/**
	 * 查找个人门户
	 *
	 * @param userid
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmFrameset findUserFrameset(String userid) throws UrmsException, RemoteException;

	/**
	 * 根据用户ID查找门户框架
	 *
	 * @param userid
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmFrameset findFrameset(String userid) throws UrmsException, RemoteException;

	/**
	 * 分页查询组织范围不为空的门户框架信息
	 *
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryNotNullFramesets(int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 分页查询组织范围为空的门户框架信息
	 *
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryIsNullFramesets(int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 根据门户框架编码查询门户框架信息
	 *
	 * @param framesetcode
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmFrameset findFramesetByFramesetcode(String framesetcode) throws UrmsException, RemoteException;

	/**
	 * 根据门户框架编码查询门户框架名称
	 *
	 * @param framesetcode
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmFrameset findFramesetByFramesetname(String framesetname) throws UrmsException, RemoteException;

	/**
	 * 根据用户名和编码分页查找门户框架
	 *
	 * @param framesetcode
	 * @param framesetname
	 * @param pageindex
	 * @param pagesize
	 * @return
	 */
	public Pagelet queryFramesetByCodeAndName(String framesetcode, String framesetname, int pageindex, int pagesize) throws UrmsException, RemoteException;

	/**
	 * 新增PORTLET
	 *
	 * @param Portlet
	 * @throws UrmsException,RemoteException
	 */
	void createPortlet(UmPortlet portlet) throws UrmsException, RemoteException;

	/**
	 * 修改PORTLET
	 *
	 * @param Portlet
	 * @throws UrmsException,RemoteException
	 */
	void updatePortlet(UmPortlet portlet) throws UrmsException, RemoteException;

	/**
	 * 根据PORTLETId删除PORTLET资料
	 *
	 * @param portletId
	 * @throws UrmsException,RemoteException
	 */
	void deletePortletById(String portletId) throws UrmsException, RemoteException;

	/**
	 * 根据PORTLETId查询PORTLET记录
	 *
	 * @param portletId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmPortlet findPortletById(String portletId) throws UrmsException, RemoteException;

	/**
	 * 分页查询PORTLET信息
	 *
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryPortlets(int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 获取指定用户的门户框架
	 *
	 * @param context
	 *            上下文路径
	 * @param userId
	 *            用户ID
	 * @return 返回门户框架内容
	 * @throws UrmsException,RemoteException
	 */
	String getPortalFrame(String contextPath, String frameId, String framesetId) throws UrmsException, RemoteException;

	/**
	 * 直接获取转向地址
	 *
	 * @param contextPath
	 *            上下文
	 * @param frameId
	 *            框架id
	 * @param framesetId
	 *            框架集ID
	 * @return 返回地址
	 * @throws UrmsException,RemoteException
	 */
	String getForwardURL(String contextPath, String frameId, String framesetId) throws UrmsException, RemoteException;

	/**
	 * 查询框架内容
	 *
	 * @param frameid
	 *            框架ID
	 * @param framesetid
	 *            门户ID
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryPortlets(String frameid, String framesetid) throws UrmsException, RemoteException;

	/**
	 * 查询框架内容
	 *
	 * @param framesetid
	 *            门户ID
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryPortlets(String framesetid) throws UrmsException, RemoteException;

	// TODO ################## CSS定义 #######################
	/**
	 * 列出所有样式
	 *
	 * @return Object[]
	 */
	Pagelet listAllCsses() throws UrmsException, RemoteException;

	/**
	 * 分页列出全部样式
	 *
	 * @param pageIndex
	 * @param pageSize
	 * @return Pagelet
	 */
	Pagelet listAllCsses(int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 根据主键id查找样式
	 *
	 * @param id
	 * @return UmCss
	 */
	UmCss findCssById(String id) throws UrmsException, RemoteException;

	/**
	 * 根据css的code查找样式
	 *
	 * @param code
	 * @return
	 */
	UmCss findCssByCode(String code) throws UrmsException, RemoteException;

	/**
	 * 创建样式
	 *
	 * @param umCss
	 */
	void createCss(UmCss umCss) throws UrmsException, RemoteException;

	/**
	 * 修改样式
	 *
	 * @param umCss
	 */
	void updateCss(UmCss umCss) throws UrmsException, RemoteException;

	/**
	 * 删除样式
	 *
	 * @param umCss
	 */
	void deleteCss(UmCss umCss) throws UrmsException, RemoteException;

	/**
	 * 根据多个主键id删除样式
	 *
	 * @param ids
	 */
	void deleteCsses(String[] ids) throws UrmsException, RemoteException;

	/**
	 * 判断css的code是否已经存在,需要参数cssid是因为修改code而不是新增code时判断
	 *
	 * @param cssid
	 *            css的id
	 * @param code
	 *            css的code
	 * @return
	 */
	boolean isExistCssCode(String cssid, String code) throws UrmsException, RemoteException;

	/**
	 * 根据业务类型查询域控制信息
	 *
	 * @param apptype
	 *            业务类型代码
	 * @return
	 */
	Pagelet queryFieldsByApptype(String apptype) throws UrmsException, RemoteException;

	/**
	 * 根据字段Id获取字段信息
	 *
	 * @param fieldid
	 * @return
	 */
	UmField findFieldById(String fieldid) throws UrmsException, RemoteException;

	/**
	 * 更新字段信息
	 *
	 * @param field
	 * @throws UrmsException,RemoteException
	 */
	void updateField(UmField field) throws UrmsException, RemoteException;

	/**
	 * 创建字段信息
	 *
	 * @param field
	 */
	void createField(UmField field) throws UrmsException, RemoteException;

	/**
	 * 删除组织
	 *
	 * @param umOrg
	 * @throws UrmsException,RemoteException
	 */
	void deleteOrg(UmOrg umOrg) throws UrmsException, RemoteException;

	/**
	 * 根据字段id删除字段信息
	 *
	 * @param fieldid
	 *            字段id
	 */
	void deleteFieldById(String fieldid) throws UrmsException, RemoteException;

	/**
	 * 删除一组字段信息
	 *
	 * @param fieldIds
	 *            字段id数组
	 * @throws UrmsException,RemoteException
	 */
	void deleteFields(String[] fieldIds) throws UrmsException, RemoteException;

	/**
	 * 删除指定业务类型下的所有字段信息
	 *
	 * @param apptype
	 *            业务类型编码
	 * @throws UrmsException,RemoteException
	 */
	void deleteFieldsByApptype(String apptype) throws UrmsException, RemoteException;

	/**
	 * 删除用户
	 *
	 * @param umUser
	 */
	void deleteUser(UmUser umUser) throws UrmsException, RemoteException;

	/**
	 * 根据菜单查询参数
	 *
	 * @param menuid
	 * @return
	 */
	UmParam findParamByMenuid(String menuid) throws UrmsException, RemoteException;

	/**
	 * 根据业务类型编码查询业务类型
	 *
	 * @param apptype
	 * @return
	 */
	UmApptype findApptypeByApptype(String apptype) throws UrmsException, RemoteException;

	/**
	 * 查询所有的业务类型
	 *
	 * @param apptype
	 * @return
	 */
	Object[] listAllApptype() throws UrmsException, RemoteException;

	/**
	 * 根据业务编码数组返回对应的业务对象数组
	 *
	 * @param types
	 * @return
	 */
	Object[] findApptypesByCodes(Object[] types) throws UrmsException, RemoteException;

	/**
	 * 列出所有的系统配置
	 *
	 * @return
	 */
	Object[] listAllSystem() throws UrmsException, RemoteException;

	/**
	 * 根据系统名称查询系统对象
	 *
	 * @param sysname
	 * @return
	 */
	public UmSystem findSystemBySysname(String sysname) throws UrmsException, RemoteException;

	/**
	 * 显示所有意见
	 *
	 * @param sysname
	 * @return
	 */
	// TODO #################### 个人意见管理 #####################
	public Pagelet queryAllOpinion() throws UrmsException, RemoteException;

	/**
	 * 根据id显示意见对象
	 *
	 * @param id
	 * @return
	 */

	public UmOpinion findOpinionById(String id) throws UrmsException, RemoteException;

	// TODO ################## 日志管理 #######################

	/**
	 * 根据起停时间分页查找操作日志
	 *
	 * @param pageIndex
	 * @param pageSize
	 * @param startTime
	 * @param endTime
	 * @return
	 */
	public Pagelet queryDologs(Calendar startTime, Calendar endTime, int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 根据用户姓名,起停时间分页查找操作日志
	 *
	 * @param pageIndex
	 * @param pageSize
	 * @param startTime
	 * @param endTime
	 * @return
	 */
	public Pagelet queryDologsbyUsername(Calendar startTime, Calendar endTime, String username, int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 根据起止日期统计登陆人数,人次
	 *
	 * @param startTime
	 * @param endTime
	 * @return Object数组列表，每个数组对象包含(String:部门名称,Integer:登陆人数,Integer:登陆人次)
	 * @throws UrmsException,RemoteException
	 */
	public Object[] queryLoginlogs(Calendar startTime, Calendar endTime) throws UrmsException, RemoteException;

	// TODO ################## 常用意见 #######################

	/**
	 * 根据userId分页显示意见对象
	 *
	 * @param id
	 * @return
	 */
	public Pagelet queryOpinionByUserId(String userId, int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 根据userId显示意见数量
	 *
	 * @param id
	 * @return
	 */

	public int queryOpinionRows(String userId) throws UrmsException, RemoteException;

	/**
	 * 修改意见对象
	 *
	 * @param id
	 * @return
	 */

	public void updateOpinion(UmOpinion umOpinion) throws UrmsException, RemoteException;

	/**
	 * 创建意见对象
	 *
	 * @param id
	 * @return
	 */

	public void createOpinion(UmOpinion umOpinion) throws UrmsException, RemoteException;

	/**
	 * 根据userId显示意见对象集合
	 *
	 * @param userId
	 * @return
	 */

	public Pagelet queryOpinionByUserId(String userId) throws UrmsException, RemoteException;

	/**
	 * 删除意见对象(根据传入的id)
	 *
	 * @param Ids
	 * @return
	 */

	public void deleteOpinionByIds(String[] ids) throws UrmsException, RemoteException;

	/**
	 * 判断意见对象是否重复(根据传入的意见内容和用户userId)
	 *
	 * @param opinionContent,userId
	 * @return
	 */

	public boolean isExistOpinion(String opinionContent, String userId) throws UrmsException, RemoteException;

	// TODO #################### 提醒消息接口 #####################

	/**
	 * 通过编UUID查找消息
	 *
	 * @param id
	 * @return
	 */
	UmMessage findMessageById(String id) throws UrmsException, RemoteException;

	/**
	 * 创建提醒消息对象
	 *
	 * @return
	 */
	void createMessage(UmMessage message) throws UrmsException, RemoteException;

	/**
	 * 创建多个消息对象
	 *
	 * @return
	 */
	void createMessages(UmMessage[] messages) throws UrmsException, RemoteException;

	/**
	 * 更新消息数据
	 *
	 * @param message
	 */
	void updateMessage(UmMessage message) throws UrmsException, RemoteException;

	/**
	 * 批量更新消息对象
	 *
	 * @param appId
	 *            表单id
	 * @param messages
	 *            消息对象列表
	 * @return 返回更新的消息对象列表
	 * @throws UrmsException,RemoteException
	 */
	Object[] updateMessages(String appId, UmMessage[] messages) throws UrmsException, RemoteException;

	/**
	 * 删除消息对象
	 *
	 * @param message
	 */
	void deleteMessage(UmMessage message) throws UrmsException, RemoteException;

	/**
	 * 删除指定表单id的信息
	 *
	 * @param appId
	 */
	void deleteMessagesByAppId(String appId) throws UrmsException, RemoteException;

	/**
	 * 根据表单id查询提醒消息
	 *
	 * @param appId
	 * @return
	 */
	Pagelet queryMessagesByAppId(String appId) throws UrmsException, RemoteException;

	/**
	 * 根据接收人id查询提醒消息
	 *
	 * @param ownerid
	 * @return
	 */
	Pagelet queryMessages(String ownerid) throws UrmsException, RemoteException;

	/**
	 * 根据接收人id查询提醒消息
	 *
	 * @param ownerid
	 * @param isread
	 * @return
	 */
	Pagelet queryMessages(String ownerid, String isread) throws UrmsException, RemoteException;

	/**
	 * 分页显示所有的消息
	 *
	 * @param ownerid
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	Pagelet queryMessages(String ownerid, int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 分页显示指定类别的消息
	 *
	 * @param ownerid
	 * @param messageType
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	Pagelet queryMessages(String ownerid, String messageType, int pageIndex, int pageSize) throws UrmsException, RemoteException;

	// TODO #################### 用户表单接口 #####################
	/**
	 * 列出所有的用户表单
	 *
	 * @return List集合 包含UmUserForm对象
	 */
	Object[] listAllUserForm(String userId) throws UrmsException, RemoteException;

	/**
	 * 通过编UUID查找用户表单对象
	 *
	 * @param id
	 * @return UmUserForm对象
	 */
	UmUserForm findUserFormById(String id) throws UrmsException, RemoteException;

	/**
	 * 通过编码查找用户表单对象
	 *
	 * @param code
	 *            编码
	 * @return UmUserForm对象
	 */
	UmUserForm findUserFormByCode(String code) throws UrmsException, RemoteException;

	/**
	 * 根据指定编码判断用户表单是否已经存在
	 *
	 * @param code
	 *            编码
	 * @return boolean值
	 */
	boolean isExistUserForm(String code) throws UrmsException, RemoteException;

	/**
	 * 创建用户表单对象
	 *
	 * @param umUserForm
	 */
	void createUserForm(UmUserForm umUserForm) throws UrmsException, RemoteException;

	/**
	 * 更新用户表单对象
	 *
	 * @param UmUserForm
	 */
	void updateUserForm(UmUserForm umUserForm) throws UrmsException, RemoteException;

	/**
	 * 删除用户表单对象
	 *
	 * @param UmUserForm
	 */
	void deleteUserForm(UmUserForm umUserForm) throws UrmsException, RemoteException;

	/**
	 * 根据指定的id集合删除用户表单对象
	 *
	 * @param String[]
	 *            ids
	 */
	void deleteUserForms(String[] ids) throws UrmsException, RemoteException;

	/**
	 * 分页查询所有的用户表单
	 *
	 * @param pageIndex
	 * @param pageSize
	 * @return Pagelet pagelet.getPageList()包含UmUserForm对象
	 */
	Pagelet queryUserForms(int pageIndex, int pageSize,String userId,boolean isMap) throws UrmsException, RemoteException;
 

	/**
	 * 分页查询指定用户id的用户表单
	 *
	 * @param userid
	 *            用户id
	 * @param pageIndex
	 *            第几页
	 * @param pageSize
	 *            分页大小
	 * @return Pagelet pagelet.getPageList()包含UmUserForm对象
	 */
	Pagelet queryUserForms(String userid, int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 根据用户ID查询用户表单信息
	 *
	 * @param userid
	 * @return Object[] 包含UmUserForm对象
	 */
	Object[] queryUserForms(String userid) throws UrmsException, RemoteException;

	/**
	 * 根据表单类型查询用户表单
	 *
	 * @param formType
	 * @return
	 */
	Pagelet queryUserFormsByFormtype(String formType,String userId) throws UrmsException, RemoteException;

	/**
	 * 根据表单类型分页查询用户表单
	 *
	 * @param formType
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	Pagelet queryUserFormsByFormtype(String formType,String userId, int pageIndex, int pageSize,boolean isMap) throws UrmsException, RemoteException;

	// TODO ################## 表单分类接口 #######################

	/**
	 * 列出所有的表单分类
	 *
	 * @return
	 */
	Pagelet listAllFormtype(String userId,String types,boolean isMap) throws UrmsException, RemoteException;

	 
	/**
	 * 通过编UUID查找表单分类对象
	 *
	 * @param id
	 * @return
	 */
	UmFormtype findFormtypeById(String id) throws UrmsException, RemoteException;

	/**
	 * 创建表单分类对象
	 *
	 * @param expr
	 */
	void createFormtype(UmFormtype umFormtype) throws UrmsException, RemoteException;

	/**
	 * 更新表单分类对象 
	 *
	 * @param umFormtype
	 */
	void updateFormtype(UmFormtype umFormtype) throws UrmsException, RemoteException;

	/**
	 * 分页查询
	 *
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	public Pagelet queryFormtype(int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 根据表单分类Id删除表单分类信息
	 *
	 * @param umFormtype
	 */
	void deleteFormtype(String umFormtype) throws UrmsException, RemoteException;

	/**
	 * 根据表单分类编码询表单分类信息
	 *
	 * @param syscode
	 * @return
	 */
	UmFormtype findFormtypesByCode(String formtypecode) throws UrmsException, RemoteException;

	/**
	 * 查询子分类
	 *
	 * @param formtypeid
	 * @param 用户ID
	 * @return Pagelet
	 */
	public Pagelet queryFormtypes(String formtypeid, String userId) throws UrmsException, RemoteException;

	/**
	 * 查询所有分类
	 *
	 * @return
	 */
	public Pagelet queryFormtypes(boolean isMap) throws UrmsException, RemoteException;
 

	// TODO ################## 其他相关接口 #######################

	/**
	 * 返回当前Urms的版本信息
	 *
	 * @return 版本信息
	 */
	public String getUrmsVersion() throws UrmsException, RemoteException;

	public UmMenuitem findMenuitem(String menuid, String pagetype, String objectid) throws UrmsException, RemoteException;

	/**
	 * 新建快捷导航
	 *
	 * @param roleRight
	 */
	void createStNav(UmStNav umStNav) throws UrmsException, RemoteException;

	void deleteUmStNavs(String syscode, String userId) throws UrmsException, RemoteException;

	Object[] getUmStnavs(String syscode, String userId) throws UrmsException, RemoteException;

	Object[] queryStNavList(String userId) throws UrmsException, RemoteException;

	/**
	 * 修复不匹配的字段
	 *
	 * @param unFitFiled
	 * @throws UrmsException,RemoteException
	 */
	public void repairUnfitOrgs(Object[] unFitFiled) throws UrmsException, RemoteException;

	/**
	 * 查询用户基本信息，根据登录帐号
	 *
	 * @param loginId
	 *            用户ID
	 * @return UmLogon
	 */
	UmLogon getLogonInfo(String logonId) throws UrmsException, RemoteException;

	/**
	 * 获取菜单的页面类型
	 *
	 * @param menucode
	 * @return
	 */
	Pagelet queryPagetypes(String menucode) throws UrmsException, RemoteException;

	/**
	 * 查找门户框架内容
	 *
	 * @param portletcode
	 * @param frameid
	 * @param framesetid
	 * @throws RemoteException
	 * @throws UrmsException,RemoteException
	 */
	UmPortlet findPortletByCode(String portletcode, String frameid, String framesetid) throws UrmsException, RemoteException;

	/**
	 * 根据起止时间分页查看登陆日志,包括登陆人数和登陆人次
	 *
	 * @param startTime
	 * @param endTime
	 * @param pageIndex
	 * @param pageSize
	 * @return pagelet.getPageList()返回List为Object数组列表，每个数组对象包含(String:部门名称,Integer:登陆人数,Integer:登陆人次)
	 */
	public Pagelet queryLoginLogs(Calendar startTime, Calendar endTime, int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 查看所有登陆日志,包括登陆人数和登陆人次
	 *
	 * @return Object数组列表，每个数组对象包含(String:部门名称,Integer:登陆人数,Integer:登陆人次)
	 */
	public Object[] listAllLoginLogs() throws UrmsException, RemoteException;

	// ###########################################证书相关接口######################################//
	/**
	 * 获取全部的证书信息列表
	 */
	Object[] listAllCerts() throws UrmsException, RemoteException;

	/**
	 * 根据证书编号取得某个证书信息
	 *
	 */
	UmCert findCertById(String id) throws UrmsException, RemoteException;

	/**
	 * 增加证书信息
	 */
	void createCert(UmCert umcert) throws UrmsException, RemoteException;

	/**
	 * 更新证书信息
	 *
	 * @param umcert
	 */
	void updateCert(UmCert umCert) throws UrmsException, RemoteException;

	/**
	 * 删除证书信息
	 *
	 * @param umcert
	 */
	void deleteCert(UmCert umCert) throws UrmsException, RemoteException;

	/**
	 * 根据ids批量删除证书
	 *
	 * @param ids
	 * @throws UrmsException,RemoteException
	 */
	void deleteCerts(String[] ids) throws UrmsException, RemoteException;

	/**
	 * 根据用户编号删除证书信息
	 *
	 * @param userId
	 *            用户
	 */
	void deleteCertByUserId(String userId) throws UrmsException, RemoteException;

	/**
	 * 根据证书指纹信息查找 Umcert
	 *
	 * @param thumbPrint
	 *            证书指纹字符串
	 * @return Umcert对象
	 */
	UmCert getCertByThumbPrint(String thumbPrint) throws UrmsException, RemoteException;

	/**
	 * 根据用户id查找 Umcert
	 *
	 * @param userid
	 *            用户id
	 * @return Umcert对象
	 */
	UmCert getCertByUserid(String userid) throws UrmsException, RemoteException;

	/**
	 * 根据用户id判断用户已经拥有证书
	 *
	 * @param userid
	 *            用户id
	 * @return boolean 是-true，否-false
	 */
	boolean isExistCert(String userid) throws UrmsException, RemoteException;

	/**
	 * 分页的列出所有UmCert对像
	 *
	 * @param pageIndex
	 *            去到第几页
	 * @param pageSize
	 *            每页大小
	 * @return
	 */
	Pagelet queryAllCerts(int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 按条件查找UmCert 并分页
	 *
	 * @param pageIndex
	 *            去到第几页
	 * @param pageSize
	 *            每页大小
	 * @param umcert
	 *            查询的条件
	 * @return
	 */
	Pagelet queryCerts(UmCert umCert, int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 根据ids批量绑定证书
	 *
	 * @param ids
	 */
	boolean bindCerts(String[] ids) throws UrmsException, RemoteException;

	/**
	 * 根据ids批量证书解除绑定关系
	 *
	 * @param ids
	 */
	boolean freeCerts(String[] ids) throws UrmsException, RemoteException;

	/**
	 * 创建UmLayout
	 *
	 * @param UmLayout
	 */
	void createLayout(UmLayout layout) throws UrmsException, RemoteException;

	/**
	 * 批量删除UmLayout
	 *
	 * @param String[]
	 */
	void deleteLayout(String[] ids) throws UrmsException, RemoteException;

	/**
	 * 更新UmLayout
	 *
	 * @param UmLayout
	 */
	void updateLayout(UmLayout layout) throws UrmsException, RemoteException;

	/**
	 * 根据ID查找UmLayout
	 *
	 * @param String
	 * @return UmLayout
	 */
	UmLayout findLayoutById(String id) throws UrmsException, RemoteException;

	/**
	 * 查询所有UmLayout
	 *
	 * @return Object[]<UmLayout>
	 */
	Object[] queryAllLayout() throws UrmsException, RemoteException;

	/**
	 * 分页查询基础平台的历史版本
	 *
	 * @param pageIndex
	 *            页号
	 * @param pageSize
	 *            页面大小
	 * @return Pagelet pageList包含version字符串
	 */
	Pagelet queryHistoryVersion(int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 按照指定版本号查询,包括基础平台，URMS,WFCSVC,ESB等
	 *
	 * @param version
	 * @return Object[]
	 */
	Object[] queryVersionsByVersion(String version) throws UrmsException, RemoteException;

	/**
	 * 查询指定版本号的补丁记录
	 *
	 * @param version
	 * @return Object[]<UmPatch>
	 */
	Object[] queryPatchByVersion(String version) throws UrmsException, RemoteException;

	/**
	 * 创建version,尚未实现
	 *
	 * @param version
	 * @throws UrmsException,RemoteException
	 */
	void createVersion(UmVersion version) throws UrmsException, RemoteException;

	/**
	 * 创建补丁,尚未实现
	 *
	 * @param patch
	 * @throws UrmsException,RemoteException
	 */
	void createPatch(UmPatch patch) throws UrmsException, RemoteException;

	/**
	 * 删除此用户的角色关系
	 *
	 * @param userId
	 *            用户ID
	 * @throws UrmsException,RemoteException
	 * @author Liubin
	 */
	void deleteUserRoleByUserId(String userId) throws UrmsException, RemoteException;

	/**
	 * 根据登陆ID查询出所有用户，因为登陆ID不唯一，登陆时根据登陆ID和密码进行验证
	 *
	 * @param logonId
	 *            登陆ID
	 * @return Object[]<UmUser> 存储UmUser的List
	 */
	Object[] queryUserByLogonId(String logonId) throws UrmsException, RemoteException;

	/**
	 * 根据当前用户ID，角色ID分页查询可以操作的角色人员
	 *
	 * @param roleId
	 * @param userId
	 * @param pageIndex
	 * @param pageSize
	 * @return Pagelet.getPageList()包含UmUser的List
	 */
	Pagelet queryRoleUsers(String roleId, String userId, int pageIndex, int pageSize) throws UrmsException, RemoteException;
	  /**
	   * 根据当前用户ID，角色ID,登录帐号，用户名分页查询可以操作的角色人员
	   * @param roleId
	   * @param userId
	   * @param logonid
	   * @param userId
	   * @param username
	   * @param pageSize
	   * @return Pagelet.getPageList()包含UmUser的List
	   */
	 Pagelet queryRoleUsers(String roleId, String userId,String logonid,String username, int pageIndex, int pageSize)throws UrmsException, RemoteException;

	/**
	 * 查询当前组织包含的直接下属
	 *
	 * @param orgId
	 * @param userId
	 * @return 当前组织的包含直接下属组织
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryOrgChildrens(String orgId, String userId) throws UrmsException, RemoteException;

	/**
	 * 查询所有版本的补丁数目
	 *
	 * @return Object[]
	 */
	Object[] queryPatchNum() throws UrmsException, RemoteException;

	/**
	 * 根据表单编码和表单名称条件分页查询用户表单
	 *
	 * @param formCode
	 * @param formName
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	Pagelet queryUserForms(String formCode, String formName,String userId,boolean isMap, int pageIndex, int pageSize) throws UrmsException, RemoteException;

	 

	/**
	 * 根据用户名称数组查询用户信息
	 *
	 * @param 用户名称
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryUsersByName(String userName) throws UrmsException, RemoteException;

	/**
	 * add by ccz on 09-3-22 更新 UmUserMapping
	 *
	 * @param userid
	 * @param logonid
	 * @param syscode
	 * @throws UrmsException,RemoteException
	 */
	void createUserMapping(String userid, String[] logonid, String[] syscode) throws UrmsException, RemoteException;

	/**
	 * * add by ccz on 09-3-22 根据用户id，删除UmUserMapping表
	 *
	 * @param userId
	 */
	void deleteUserMappingByUserId(String userId) throws UrmsException, RemoteException;

	/**
	 * * add by ccz on 09-3-22 根据userId返回UserMapping 的List
	 *
	 * @param userId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Object[] queryUserMappingByUserId(String userId) throws UrmsException, RemoteException;

	/**
	 * * add by ccz on 09-3-22 根据用户id与 系统code得到UmUserMapping 对像
	 *
	 * @param userId
	 * @param sysCode
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmUserMapping findUserMappingByUserIdAndSysCode(String userId, String sysCode) throws UrmsException, RemoteException;

	/**
	 * 执行sql
	 */
	void executeDDL(String ddl) throws UrmsException, RemoteException;

	/**
	 * add by wzz 根据Userid和菜单id(UUID)查询有权限的功能点
	 *
	 * @param userId
	 * @param menuId
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	Pagelet queryMenuitemsByUserIdAndMenuId(String userId, String menuId) throws UrmsException, RemoteException;

	/**
	 * 查询出含有冗余数据的表
	 *
	 * @param id
	 *            删除的记录ID
	 * @param type
	 *            删除记录所在表名
	 * @return 存储表名的 Object[]<String>
	 * @throws UrmsException,RemoteException
	 */
	Object[] listRubbTablesByIdType(String id, String type) throws UrmsException, RemoteException;

	/**
	 * 创建删除数据记录，此方法和createRecycle区别，前者会执行删除deltables里面的表冗余数据
	 *
	 * @param recycle
	 */
	void deleteDataToXml(UmRecycleBin recycle) throws UrmsException, RemoteException;

	/**
	 * 返回删除数据所在表名，不重复
	 *
	 * @return
	 */
	Object[] listTypes() throws UrmsException, RemoteException;

	/**
	 * 根据tablename查询指定类型的数据
	 *
	 * @param type
	 *            tablename
	 * @param condition
	 *            查询条件
	 * @param pageIndex
	 *            页码
	 * @param pageSize
	 *            显示数目
	 * @return pagelet.getPageList() 返回存储UmRecycleBin的List
	 */
	Pagelet queryRecyclesByType(String type, String condition, int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 根据ID查询UmRecycleBin
	 *
	 * @param id
	 * @return UmRecycleBin
	 */
	UmRecycleBin findRecycleById(String id) throws UrmsException, RemoteException;

	/**
	 * 还原数据
	 *
	 * @param override
	 *            是否覆盖
	 * @param idArray
	 *            ID数组
	 * @return String XML格式验证结果
	 * @throws UrmsException,RemoteException
	 */
	String revertRecycles(String[] idArray, Object[] paraMap) throws UrmsException, RemoteException;

	/**
	 * 批量删除回收站数据
	 *
	 * @param recArr
	 *            删除记录数组
	 * @throws UrmsException,RemoteException
	 */
	void deleteRecycles(UmRecycleBin[] recArr) throws UrmsException, RemoteException;

	/**
	 * 验证是否能被还原
	 *
	 * @param dataids
	 *            ID数组
	 * @return 验证结果
	 * @throws UrmsException,RemoteException
	 */
	String validateRevertData(String[] dataids) throws UrmsException, RemoteException;

	/**
	 * 通过编UUID查找搜索对象
	 *
	 * @param id
	 * @return
	 */
	UmWebformSearch findWebformSearchById(String id) throws UrmsException, RemoteException;

	/**
	 * 创建搜索对象
	 *
	 * @param expr
	 */
	void createWebformSearch(UmWebformSearch webformSearch) throws UrmsException, RemoteException;

	/**
	 * 更新搜索对象
	 *
	 * @param umWebformSearch
	 */
	void updateWebformSearch(UmWebformSearch webformSearch) throws UrmsException, RemoteException;

	/**
	 * 删除搜索对象
	 *
	 * @param umWebformSearch
	 */
	void deleteWebformSearch(UmWebformSearch webformSearch) throws UrmsException, RemoteException;

	/**
	 * 根据配置Id删除搜索信息
	 *
	 * @param umConfig
	 */
	void deleteWebformSearch(String webformSearchId) throws UrmsException, RemoteException;

	/**
	 * 分页查询
	 *
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	Pagelet queryWebformSearch(int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 根据表单分类webformtype分页查询
	 *
	 * @param pageIndex
	 * @param pageSize
	 * @param webformtype
	 * @return
	 */
	Pagelet queryWebformSearchs(int pageIndex, int pageSize, String webformtype) throws UrmsException, RemoteException;

	/**
	 * 根据搜索编码,搜索名称,表单分类webformtype分页查询
	 *
	 * @param pageIndex
	 * @param pageSize
	 * @param webformtype
	 * @return
	 */
	Pagelet queryWebformSearchs(String webformSearch, String webformSearchname, int pageIndex, int pageSize, String webformtype) throws UrmsException, RemoteException;

	/**
	 * 根据表单分类webformtype查询
	 *
	 * @param webformtype
	 * @return
	 */
	Pagelet queryWebformSearchs(String webformtype) throws UrmsException, RemoteException;

	/**
	 * 根据搜索编码查询搜索
	 *
	 * @param webformSearch
	 * @return
	 */
	UmWebformSearch findWebformSearchsByCode(String webformSearch) throws UrmsException, RemoteException;

	/**
	 * 通过编UUID查找搜索项对象
	 *
	 * @param id
	 * @return
	 */
	UmWebformSearchitem findWebformSearchitemById(String id) throws UrmsException, RemoteException;

	/**
	 * 创建搜索项对象
	 *
	 * @param expr
	 */
	void createWebformSearchitem(UmWebformSearchitem webformSearchitem) throws UrmsException, RemoteException;

	/**
	 * 更新搜索项对象
	 *
	 * @param webformSearchitem
	 */
	void updateWebformSearchitem(UmWebformSearchitem webformSearchitem) throws UrmsException, RemoteException;

	/**
	 * 删除搜索项对象
	 *
	 * @param webformSearchitem
	 */
	void deleteWebformSearchitem(UmWebformSearchitem webformSearchitem) throws UrmsException, RemoteException;

	/**
	 * 根据配置Id删除搜索项信息
	 *
	 * @param umConfig
	 */
	void deleteWebformSearchitem(String webformSearchitemId) throws UrmsException, RemoteException;

	/**
	 * 分页查询
	 *
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	Pagelet queryWebformSearchitem(int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 根据搜索编号webformSearchitemCode分页查询
	 *
	 * @param pageIndex
	 * @param pageSize
	 * @param syscode
	 * @return
	 */
	Pagelet queryWebformSearchitems(int pageIndex, int pageSize, String webformSearchitemCode) throws UrmsException, RemoteException;

	/**
	 * 根据搜索编号WebformSearchCode查询
	 *
	 * @param webformSearchCode
	 * @return
	 */
	Pagelet queryWebformSearchitems(String webformSearchCode) throws UrmsException, RemoteException;

	/**
	 * 根据搜索项编码查询搜索项
	 *
	 * @param webformSearchitemCode
	 * @return
	 */
	UmWebformSearchitem findWebformSearchitemsByCode(String webformSearchitemCode) throws UrmsException, RemoteException;

	/**
	 * 创建信息
	 *
	 * @param webformsearchcode
	 * @param webformSearchitems
	 * @throws UrmsException,RemoteException
	 */
	void createWebformSearchitems(String webformsearchcode, UmWebformSearchitem[] webformSearchitems) throws UrmsException, RemoteException;

	/**
	 * 删除角色后，更新用户角色表，roleList为null或长度等于0时更新所有用户角色
	 *
	 * @param orgList
	 *            Object[]<String>角色ID
	 * @return String 更新结果
	 * @throws UrmsException,RemoteException
	 */
	String updateUserRoleids(Object[] roleList) throws UrmsException, RemoteException;

	// ======工作列表配置 start=======/
	/**
	 * 列出所有的工作列表配置项
	 * @param status  DB 是待办,YB 是已办
	 * @return
	 */
	Object[] listWorkItemCfgs(String status) throws UrmsException, RemoteException;

	/**
	 * 列出所有的工作列表配置项
	 * @param status  DB 是待办,YB 是已办
	 * @param isshow  是否显示 Y-是 N-否
	 * @return
	 */
	Object[] listWorkItemCfgs(String status,String isshow) throws UrmsException, RemoteException;

	/**
	 * 保存工作列表配置项
	 * @param workitemcfg
	 * @return
	 */
	void createWorkItemCfg(UmWorkItemCfg umworkitemcfg) throws UrmsException, RemoteException;

	/**
	 * 批量的保存工作列表配置项
	 *
	 * @param workitemcfgs
	 * @return
	 */
	void createWorkItemCfgs(Object[] umworkitemcfgs) throws UrmsException, RemoteException;

	/**
	 * 根据status删除此类型下的所有工作列表配置
	 *
	 * @param status
	 */
	void deleteWorkItemCfgs(String status) throws UrmsException, RemoteException;


	// ======工作列表配置 end=======/

	// ======督办配置 start =========/
	/**
	 * 增加督办配置
	 *
	 * @param umsupervisecfg
	 */
	void createSuperviseCfg(UmSuperviseCfg umsupervisecfg) throws UrmsException, RemoteException;

	/**
	 * 删除督办配置
	 *
	 * @param umsupervisecfg
	 */
	void deleteSuperviseCfg(UmSuperviseCfg umsupervisecfg) throws UrmsException, RemoteException;

	/**
	 * 更新督办配置
	 *
	 * @param umsupervisecfg
	 */
	void updateSuperviseCfg(UmSuperviseCfg umsupervisecfg) throws UrmsException, RemoteException;

	/**
	 * 根据id取得督办配置
	 *
	 * @param umsvid
	 * @return
	 */
	UmSuperviseCfg findSuperviseCfgByUmsvid(String umsvid) throws UrmsException, RemoteException;

	/**
	 * 根据流程实例id 来查配置
	 *
	 * @param processinstanceid
	 * @return
	 * @throws UrmsException,RemoteException
	 */
	UmSuperviseCfg findSuperviseCfgByProcessinstanceid(String processinstanceid) throws UrmsException, RemoteException;

	/**
	 * 查找所有到期发送的配置
	 *
	 * @return
	 */
	Object[] querySuperviseCfgsMature() throws UrmsException, RemoteException;

	// ======督办配置 end =========/
	// ======督办消息配置 start =====/
	/**
	 * 创建 消息载体
	 *
	 * @param umsupervisecfg
	 */
	void createSupervisMsg(UmSuperviseMsg umsupervisemsg) throws UrmsException, RemoteException;

	/**
	 * 更新 消息载体
	 *
	 * @param umsupervisecfg
	 */
	void updateSuperviseMsg(UmSuperviseMsg umsupervisemsg) throws UrmsException, RemoteException;

	/**
	 * 查询这个配置的所有通知实体
	 *
	 * @param umsupervisecfgid
	 * @return
	 */
	Object[] querySuperviseMsgByCfgId(String umsupervisecfgid) throws UrmsException, RemoteException;

	// ======督办消息配置 end =====/

	/**
	 * 根据角色编码查询角色人员
	 * @param rolecode 角色编码
	 * @return Pagelet.getPageList返回UmUser数组对象
	 * @throws UrmsException
	 * @throws RemoteException
	 */
	public Pagelet queryRoleUsersByRolecode(String rolecode)throws UrmsException, RemoteException;

	/**
	 * 根据角色编码和用户ID查询用户管理组织范围下的角色人员
	 * @param rolecode 角色编码
	 * @param userid 用户ID
	 * @return Pagelet.getPageList返回UmUser数组对象
	 * @throws UrmsException
	 * @throws RemoteException
	 */
	public Pagelet queryRoleUsersByRolecode(String rolecode,String userid)throws UrmsException, RemoteException;


	/**
	 * 通过编UUID查找快捷菜单对象
	 * 
	 * @param id
	 * @return
	 */
	UmShortcutmenu findShortcutmenuById(String id)throws UrmsException, RemoteException;

	/**
	 * 创建快捷菜单对象
	 * 
	 * @param expr
	 */
	void createShortcutmenu(UmShortcutmenu umShortcutmenu)throws UrmsException, RemoteException;

	/**
	 * 更新快捷菜单对象
	 * 
	 * @param umShortcutmenu
	 */
	void updateShortcutmenu(UmShortcutmenu umShortcutmenu)throws UrmsException, RemoteException;

	/**
	 * 删除快捷菜单对象
	 * 
	 * @param umShortcutmenu
	 */
	void deleteShortcutmenu(UmShortcutmenu umShortcutmenu)throws UrmsException, RemoteException;
	
	/**
	 * 根据配置Id删除快捷菜单信息
	 * 
	 * @param umConfig
	 */
	void deleteShortcutmenu(String shortcutmenuId)throws UrmsException, RemoteException; 
	
	/**
	 *  通过菜单ID和用户ID查找快捷菜单对象
	 * @param menuid 菜单ID
	 * @param userid 用户ID
	 * @return
	 */
	UmShortcutmenu findShortcutmenu(String menuid,String userid)throws UrmsException, RemoteException;

	/**
	 * 查找该用户的快捷菜单
	 * @param userid 用户ID
	 * @param type 快捷类型 0--指定菜单，1--常用菜单，2--最后使用菜单
	 * @return
	 */
	public Pagelet queryShortcutmenus(String userid,String type)throws UrmsException, RemoteException;
	
	
	// TODO #################### 用户报表接口  -----------------------#####################
	/**
	 * 列出所有的用户报表
	 *
	 * @return List集合 包含UmUserRep对象
	 */
	Object[] listAllUserRep() throws UrmsException, RemoteException;

	/**
	 * 通过编UUID查找用户报表对象
	 *
	 * @param id
	 * @return UmUserRep对象
	 */
	UmUserRep findUserRepById(String id) throws UrmsException, RemoteException;

	/**
	 * 通过编码查找用户报表对象
	 *
	 * @param code
	 *            编码
	 * @return UmUserRep对象
	 */
	UmUserRep findUserRepByCode(String code) throws UrmsException, RemoteException;

	/**
	 * 根据指定编码判断用户报表是否已经存在
	 *
	 * @param code
	 *            编码
	 * @return boolean值
	 */
	boolean isExistUserRep(String code) throws UrmsException, RemoteException;

	/**
	 * 创建用户报表对象
	 *
	 * @param umUserRep
	 */
	void createUserRep(UmUserRep umUserRep) throws UrmsException, RemoteException;

	/**
	 * 更新用户报表对象
	 *
	 * @param UmUserRep
	 */
	void updateUserRep(UmUserRep umUserRep) throws UrmsException, RemoteException;

	/**
	 * 删除用户报表对象
	 *
	 * @param UmUserRep
	 */
	void deleteUserRep(UmUserRep umUserRep) throws UrmsException, RemoteException;

	/**
	 * 根据指定的id集合删除用户报表对象
	 *
	 * @param String[]
	 *            ids
	 */
	void deleteUserReps(String[] ids) throws UrmsException, RemoteException;

	/**
	 * 分页查询所有的用户报表
	 *
	 * @param pageIndex
	 * @param pageSize
	 * @return Pagelet pagelet.getPageList()包含UmUserRep对象
	 */
	Pagelet queryUserReps(int pageIndex, int pageSize,String userId) throws UrmsException, RemoteException; 

	/**
	 * 分页查询指定用户id的用户报表
	 *
	 * @param userid
	 *            用户id
	 * @param pageIndex
	 *            第几页
	 * @param pageSize
	 *            分页大小
	 * @return Pagelet pagelet.getPageList()包含UmUserRep对象
	 */
	Pagelet queryUserReps(String userid, int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 根据用户ID查询用户报表信息
	 *
	 * @param userid
	 * @return Object[] 包含UmUserRep对象
	 */
	Object[] queryUserReps(String userid) throws UrmsException, RemoteException;

	/**
	 * 根据报表类型查询用户报表
	 *
	 * @param repType
	 * @return
	 */
	Pagelet queryUserRepsByReptype(String repType,String userId) throws UrmsException, RemoteException;

	/**
	 * 根据报表类型分页查询用户表单
	 *
	 * @param repType
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	Pagelet queryUserRepsByReptype(String repType,String userId, int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 根据报表编码和报表名称条件分页查询用户报表
	 *
	 * @param formCode
	 * @param formName
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	Pagelet queryUserReps(String repCode, String repName,String userId, int pageIndex, int pageSize) throws UrmsException, RemoteException;

	// TODO ################## 报表分类接口 #######################

	/**
	 * 列出所有的报表分类
	 *
	 * @return
	 */
	Pagelet listAllReptype(String userId) throws UrmsException, RemoteException;
 
	/**
	 * 通过编UUID查找报表分类对象
	 *
	 * @param id
	 * @return
	 */
	UmReptype findReptypeById(String id) throws UrmsException, RemoteException;

	/**
	 * 创建报表分类对象
	 *
	 * @param expr
	 */
	void createReptype(UmReptype umReptype) throws UrmsException, RemoteException;

	/**
	 * 更新报表分类对象
	 *
	 * @param umReptype
	 */
	void updateReptype(UmReptype umReptype) throws UrmsException, RemoteException;

	/**
	 * 分页查询
	 *
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	public Pagelet queryReptype(int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 根据报表分类Id删除报表分类信息
	 *
	 * @param umReptype
	 */
	void deleteReptype(String umReptype) throws UrmsException, RemoteException;

	/**
	 * 根据报表分类编码询报表分类信息
	 *
	 * @param syscode
	 * @return
	 */
	UmReptype findReptypesByCode(String reptypecode) throws UrmsException, RemoteException;

	/**
	 * 查询子分类
	 *
	 * @param reptypeid
	 * @return Pagelet
	 */
	public Pagelet queryReptypes(String reptypeid,String userId) throws UrmsException, RemoteException;

	/**
	 * 查询所有分类
	 *
	 * @return
	 */
	public Pagelet queryReptypes() throws UrmsException, RemoteException;
 
	
	/**
	 * 根据modle类返回数据表对象
	 * @param ddl 查询语句
	 * @param type (insert:插入语句，create:创建表语句)
	 * @return
	 * @throws UrmsException
	 * @throws RemoteException
	 */
	public String  getUrmsDDL(String ddl,String type) throws UrmsException, RemoteException;
	
	
	
	// TODO ################## 项目接口 houxy #######################

	/**
	 * 列出所有的项目
	 *
	 * @return
	 */
	Pagelet listAllItemtype() throws UrmsException, RemoteException;

	 
	/**
	 * 通过编UUID查找项目对象
	 *
	 * @param id
	 * @return
	 */
	UmItemtype findItemtypeById(String id) throws UrmsException, RemoteException;

	/**
	 * 创建项目对象
	 *
	 * @param expr
	 */
	void createItemtype(UmItemtype umItemtype) throws UrmsException, RemoteException;

	/**
	 * 更新项目对象
	 *
	 * @param umItemtype
	 */
	void updateItemtype(UmItemtype umItemtype) throws UrmsException, RemoteException;

	/**
	 * 分页查询
	 *
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	public Pagelet queryItemtype(int pageIndex, int pageSize) throws UrmsException, RemoteException;

	/**
	 * 根据项目Id删除项目信息
	 *
	 * @param umItemtype
	 */
	void deleteItemtype(String umItemtype) throws UrmsException, RemoteException;

	/**
	 * 根据项目编码询项目信息
	 *
	 * @param syscode
	 * @return
	 */
	UmItemtype findItemtypesByCode(String itemtypecode) throws UrmsException, RemoteException;

	/**
	 * 按条件分页查询
	 * @param itemtypecode
	 * @param itemtypename
	 * @param orgid 	
	 * @param itemmembers
	 * @param itempaths
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 * @throws UrmsException
	 * @throws RemoteException
	 */
	public Pagelet queryItemtypes(String itemtypecode,String itemtypename,String orgid,String itemmembers,String itempaths,int pageIndex, int pageSize) throws UrmsException, RemoteException;


	/**
	 * 查询所有项目
	 *
	 * @return
	 */
	public Pagelet queryItemtypes() throws UrmsException, RemoteException;
	
	/**
	 *  查询所有引入该表单ID的项目
	 * @param formtypeid
	 * @return
	 */
	public Pagelet queryItemtypes(String formtypeid) throws UrmsException, RemoteException;
	

	/**
	 *  根据用户查询所有所属项目
	 * @param formtypeid
	 * @return
	 */
	public Pagelet queryItemtypesByUser(String userid) throws UrmsException, RemoteException;
	/**
	 * 根据表名及id删除EC同步数据
	 * @param tabnaem
	 * @param optid 
	 */
	void delEcorgoptById(String tabnaem,String optid) throws UrmsException, RemoteException;
	/**
	 * 根据表名及类型删除EC同步数据
	 * @param tabnaem
	 * @param stype 
	 */
	void delEcorgopts(String tabnaem,String stype) throws UrmsException, RemoteException;
	/**
	 * 根据表名及类型查询EC同步数据
	 * @param tabnaem
	 * @param stype
	 * @return
	 */
	Pagelet queryEcorgopts(String tabnaem,String stype) throws UrmsException, RemoteException;
	
	/**
	 * 从recno的位置开始查询recno之后的查询 UmOrgOpt记录列表，每次50条
	 * @param recno
	 * @return
	 * @throws UrmsException
	 * @throws RemoteException
	 */
	public Object[] queryOrgOpt(long recno) throws UrmsException, RemoteException;
 }